import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @description:
 * @author: Zane Zhang
 * @create: 2022-11-05 15:33
 **/
public class Test {
    public static void main(String[] args) throws IOException {
        method();//调用方法
    }
    public static void method() throws FileNotFoundException, IOException {
        VerifyCode verifyCode = new VerifyCode();
        //去查看项目目录下的 test.jpg
        verifyCode.output(verifyCode.getImage(), new FileOutputStream("test.jpg"));
        String str = verifyCode.getText();//调用verifyCode类的getText()方法,return四位验证码
        System.out.println(str);//打印到,与test.jpg对应
    }



}
